<template>
  <div class="movie">
    <h1>Movie</h1>
    <h3>Count组件中的num值是{{ num }}</h3>
    <h3>Count组件中的doubleNum值是{{ doubleNum }}</h3>
    <button @click="getMovieList">获取最新的电影列表</button>
    <ul>
      <li v-for="item in movieList" :key="item.tvId">
        <span style="font-size: 20px">{{ item.name }}</span>
      </li>
    </ul>
  </div>
</template>

<script>
import { mapState, mapGetters, mapActions } from "vuex";
export default {
  name: "Movie",
  mounted() {},
  methods: {
    ...mapActions("Movie", ["getMovieList"]),
  },
  computed: {
    ...mapState("Count", ["num"]),
    ...mapGetters("Count", ["doubleNum"]),
    ...mapState("Movie", ["movieList"]),
  },
};
</script>

<style scoped>
.movie {
  background: yellowgreen;
}
</style>
